import React from 'react';
import { Route, Routes, HashRouter, Navigate } from 'react-router-dom';
import MainBox from '../MainBox';
import Demo from '../../pages/Demo';
import Demo2 from '../../pages/Demo2';
import Home from '../../pages/Home';
import Page1 from '../../pages/Page1';
import PaginationDemo from '../../pages/PaginationDemo';
import Login from '../../pages/Login';
import VirtualScroll from '../../pages/VirtualScroll';
import BreadcrumbDemo from '../../pages/BreadcrumbDemo';
import RateDome from '../../pages/RateDome';

const RouteBox = () => {
    return (
        <HashRouter>
            <Routes>
                <Route element={<Login />} path="/login" />
                <Route element={<MainBox />} path="/">
                    <Route element={<Demo />} path="demo" />
                    <Route element={<Demo2 />} path="demo2" />
                    <Route element={<Home />} path="home" />
                    <Route element={<Page1 />} path="page1" />
                    <Route element={<PaginationDemo />} path="paginationDemo" />
                    <Route element={<VirtualScroll />} path="virtualScroll" />
                    <Route element={<BreadcrumbDemo />} path="breadcrumbDemo" />
                    <Route element={<RateDome />} path="rate" />
                    <Route element={<Navigate replace to="home" />} path="" />
                </Route>
            </Routes>
        </HashRouter>
    );
};

export default RouteBox;
